16
|
How do I refresh the control
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:Items():Add("Item 1")
oExMenu:Refresh()
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
15
|
How do I change the color to highligth the selected item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("HighLightBorderColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
14
|
How do I change the drop down, popup menu foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("PopupForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
13
|
How do I change the drop down, popup menu background color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("PopupBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
12
|
How do I change the control's shadow color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("ShadowColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
11
|
How do I place the control on vertical

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:OpenMode := 1/*Horizontal*/
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
10
|
How do I change the control's appearance
#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:Appearance := 2/*Button*/
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
9
|
How do I change the control's appearance

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:Appearance := 0/*Normal*/
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
8
|
How do I change the visual appearance effect for the selected item, using EBN

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oExMenu:SetProperty("SelBackColor",0x1000000)
oExMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
7
|
How do I change the colors for the selected item

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor ( { 0,0,0 } ) , .F. ))
oExMenu:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,255,255 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
6
|
How do I change the control's foreground color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor ( { 255,0,0 } ) , .F. ))
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
5
|
How do I change the control's background color

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor ( { 200,200,200 } ) , .F. ))
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
4
|
How can I change the control's font

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:Font():Name := "Tahoma"
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
3
|
How do I change the drop down menu's border

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:Border := 1/*FlatBorder*/
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
2
|
How do I change the control's border, using your EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:VisualAppearance():Add(1,"c:\exontrol\images\normal.ebn")
oExMenu:MenuBarBorder := 16777216/*0x1000000+*/
oExMenu:Border := 16777216/*0x1000000+*/
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|
1
|
How do I change the control's border

#include "AppEvent.ch"
#include "ActiveX.ch"
PROCEDURE Main
LOCAL oForm
LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
LOCAL oExMenu
oForm := XbpDialog():new( AppDesktop() )
oForm:drawingArea:clipChildren := .T.
oForm:create( ,,{100,100}, {640,480},, .F. )
oForm:close := {|| PostAppEvent( xbeP_Quit )}
oExMenu := XbpActiveXControl():new( oForm:drawingArea )
oExMenu:CLSID := "Exontrol.ExMenu.1" /*{7BE68958-94A9-4BCF-B556-8B31738F6FC2}*/
oExMenu:create(,, {10,60},{610,370} )
oExMenu:MenuBarBorder := 1/*FlatBorder*/
oExMenu:Items():ToString := "Item 1[id=10](SubItem 1[id=20](SubItem 1.1[id=30],SubItem 1.2[id=40]),SubItem 2[id=50]),Item 2[id=60](SubItem 1[id=70],SubItem 2[id=80])"
oForm:Show()
DO WHILE nEvent != xbeP_Quit
nEvent := AppEvent( @mp1, @mp2, @oXbp )
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN
|